The present invention relates to a device for calculating estimated time stamps ì, the device comprising processor means provided with an output, and with an input for receiving true times Yt of a data packet number t having the linear form:
Yt=Ytxe2x88x921+xcex2t,
xcex2t=xcex2txe2x88x921+xcex7t,
with xcex7t being a small perturbation relative to the linear relation between time and packet number, whereby the processor means are arranged:
to observe the true time of data packet number t as:
ot=Yt+xcex5t,
where xcex5t is an observational error, and
to produce at its output the estimated time stamps according to:
ìt=ìtxe2x88x921+xcex2t.
The present invention also relates to a method set out in the preamble of claim 5.
Such a device and method are known from xe2x80x9cBayesian forecasting and dynamic modelsxe2x80x9d, by West, M. and J. Harrison, in particular section 7.3, Springer, 1998. Described therein is the Bayesian Kalman model, which is a dynamic linear model for predicting time stamps ìt, based on true times Yt of an input data packet number t. This technique is applied in Digital Videocommunication Systems used in the distribution and combination of for example video signals for multiplexing, re-multiplexing and de-multiplexing in particular MPEG (=Moving Picture Encoded Group) transport streams. Usually the relation between time and packet number is linear in e.g. MPEG streams. In practise the specifications of these streams allow for small deviations from linearity, whereby the coefficients of the linear relation may vary slowly in time. The true times Yt of data packet number t can be described in the linear form as:
Yt=Ytxe2x88x921+xcex2t,
xe2x80x83xcex2t=xcex2txe2x88x921+xcex7t,
with xcex7t being a small perturbation relative to the linear relation between time and packet number, that holds in the vicinity of packet txe2x88x921. The true time of data packet number t is observed as:
ot=Yt+xcex5t,
where xcex5t is an observational error. xcex5t and xcex7t are stochastic variables having a normal distribution in the standard theoretical development of the model. Now based on prior knowledge about (xcex20, Y0), an explicit Bayesian analysis can be performed leading to a posterior distribution of (xcex2t, Yt) after observing ot. This leads to the known Bayesian Kalman filter as a means for revealing ìt as an estimate for the true time Yt, given the observed time (o1, . . . , ot) of packet t. West and the Harringtons give a full formal derivation thereof in section 7.3. Two Bayesian Kalman, to be referred to as BK, estimates are proposed. The ordinary BK is optimal with respect to a tracking error xcex4(t), defined by: #Ytxe2x88x92ìt# less than xcex4(t), whereas a smoothed BK estimate is optimal with respect to smoothness, defined by: #ìtxe2x88x922ìtxe2x88x921+ìtxe2x88x922# less than xcex4(s).
It is a disadvantage of the standard Bayesian Kalman device and method that, either tracking or smoothing constraints can only be complied with.
Therefore it is an object of the present invention to provide an improved Bayesian Kalman device and method, which can simultaneously comply with both the above tracking constraint and the above smoothing constraint.
Thereto the device according to the present invention is characterised in that the computation by the processing means is such that the value of xcex2t is made dependent on the exceeding by #otxe2x88x92ìtxe2x88x921xe2x88x92xcex2txe2x88x921 # of max[xcex5t].
It is an advantage of the device according to the invention that the values of xcex5t are made conditional on the difference between the observed true time ot and the estimated time stamps ìt. If tracking becomes a problem the maximum value of xcex5t (which is max[xcex5t]), is exceeded by that difference and then xcex2t can be chosen to have a different value, such that tracking will no longer be a problem. Thus the result is a sequence of time stamps, which is both smooth and accurate, which is especially but not exclusively important in an SW-MUX (SoftWare encoding and MUltipleXing), TokenMux or DTS (Decode Time Stamp) environment, where observed time stamps in data, samples and/or packets can be very noisy or are provided with jitter.
As time stamps are very important in devices and apparatus that time, multiplex, demultiplex or remultiplex program components, such as program encoders, splicers etcetera, an improved timing accuracy also improves the video image quality and synchronisation capabilities. It also shortens the acquisition time in transport stream equipment, such as with MPEG-2 transport streams.
Another embodiment of the device according to the invention is characterised in that the computation by the processing means is such that:
xcex2t equals xcex2t(i) if #otxe2x88x92ìtxe2x88x921xe2x88x92xcex2txe2x88x921 #xe2x89xa6max[xcex5t], else
xcex2t equals xcex2txe2x88x921+sign(otxe2x88x92ìtxe2x88x921xe2x88x92xcex2txe2x88x921)max[xcex7t], with
xcex2t(i)=xcex2txe2x88x921+rA,
A=(otxe2x88x92ìtxe2x88x921xe2x88x92xcex2txe2x88x921)/var[ot],
r being the priorxe2x80x94i.e before observing otxe2x80x94correlation between xcex2t and Yt; and that:
ìt=ìtxe2x88x921+xcex2txe2x88x921+A*var[Yt].
Advantageously in case of tracking problems the values of xcex2t are updated at the maximum rate that is allowed by the specifications, whereby this boosted estimate replaces the smooth Bayesian Kalman estimate of xcex2t in the Kalman recursion relations. The filter thus devised approaches to some extend the known Bayesian Kalman filter device as a special case, which may be achieved by setting max[xcex5t]=∞. Advantageously the device according to the invention has three degrees of freedom: max[xcex5t] which usually is the upper bound to the magnitude of the noise, max[xcex7t] which is the upper bound to the maximum nonlinearity that is allowed, and var[xcex5t] or "sgr"2[xcex5t] being the variance of the statistical noise distribution.
One embodiment of the device according to the invention is characterised in that the processing means are programmable processing means, which are programmed to perform said computations. It is an advantage of the device according to the invention that no essential hardware is necessary and that the computations can be done by an ordinary computer, such as a PC, whereon the advanced BK filter can be software implemented.
Easy and flexible programming is realised in a further embodiment of the device according to the invention, which is characterised in that the computations are programmed in the C programming language.
Similarly the method according to the present invention has the characterising features outlined in claim 5, and the advantages set out above.